
from django.urls import path,include
from rest_framework.routers import DefaultRouter
from . import views

app_name = 'absent'

router = DefaultRouter(trailing_slash=False)
'''
router.register(prefix,viewset,basename=')
prefix: 路由的前缀，URL的一部分
viewset 绑定的视图集 常用来验证或者 处理数据库模型的 CRUD 操作
basename 路由反转用到到

'''
router.register(r'absent',views.AbsentViewSet, basename='absent')

urlpatterns = [
    path('absent/type',views.AbsentTpyeView.as_view(),name='absentTypes'),
    path('absent/responder',views.ResponderView.as_view(),name='reponderView'),
              ]+router.urls
